/**
 * @class
 * @memberof w.parser
 * @param {*} message 消息
 * @param {*} callback 处理完成的回调
 */
function createCube(message, callback) {
    let { size } = message;
    const x=size[0]/2,y=size[1]/2,z=size[2]/2;
    const position = new Float32Array([
        x, y, -z,
        -x, y, -z,
        x, -y, -z,
        -x, -y, -z,
        x, y, z,
        -x, y, z,
        x, -y, z,
        -x, -y,z
      ]);
      const indices = new Uint16Array([
        0, 2, 1,
        2, 3, 1,
        4, 5, 6,
        5, 7, 6,
        4, 0, 5,
        0, 1, 5,
        6, 7, 2,
        7, 3, 2,
        6, 0, 4,
        6, 2, 0,
        5, 1, 7,
        1, 3, 7]);
    callback({ data: { indices, position }, transferlist: [indices.buffer, position.buffer] });
  }
  
  export { createCube }